<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sends an arbitrary command to an FTP server</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ftp-quit.html">ftp_quit</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ftp-rawlist.html">ftp_rawlist</a></div>
 <div class="up"><a href="ref.ftp.html">FTP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.ftp-raw" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ftp_raw</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">ftp_raw</span> &mdash; <span class="dc-title">Sends an arbitrary command to an FTP server</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.ftp-raw-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>ftp_raw</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$ftp_stream</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$command</code></span>
   )</div>

  <p class="para rdfs-comment">
   Sends an arbitrary <em><code class="parameter">command</code></em> to the FTP server. 
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.ftp-raw-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">ftp_stream</code></em></dt>

     <dd>

      <p class="para">
       The link identifier of the FTP connection.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">command</code></em></dt>

     <dd>

      <p class="para">
       The command to execute.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.ftp-raw-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the server&#039;s response as an array of strings.
   No parsing is performed on the response string, nor does 
   <span class="function"><strong>ftp_raw()</strong></span> determine if the command succeeded.  
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.ftp-raw-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4208">
    <p><strong>Example #1 Using <span class="function"><strong>ftp_raw()</strong></span> to login to an FTP server manually.</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"ftp.example.com"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*&nbsp;This&nbsp;is&nbsp;the&nbsp;same&nbsp;as:&nbsp;<br />&nbsp;&nbsp;&nbsp;ftp_login($fp,&nbsp;"joeblow",&nbsp;"secret");&nbsp;*/<br /></span><span style="color: #0000BB">ftp_raw</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"USER&nbsp;joeblow"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">ftp_raw</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"PASS&nbsp;secret"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.ftp-raw-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.ftp-exec.html" class="function" rel="rdfs-seeAlso">ftp_exec()</a> - 请求运行一条 FTP 命令</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ftp-quit.html">ftp_quit</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ftp-rawlist.html">ftp_rawlist</a></div>
 <div class="up"><a href="ref.ftp.html">FTP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
